Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to re-implement fsk operation using adafruit_rfm modules #36

Merged
merged 25 commits into from
Nov 18, 2024

Conversation

Camerooooon
Copy link
Contributor

@Camerooooon Camerooooon commented Oct 10, 2024

This pull request is a work in progress.
Resolves #35

@Camerooooon
Copy link
Contributor Author

Currently I am unable hear any tx from the satellite using a radio despite the output of the "send" function (See Field.py line 46) being True. I'm not sure why.

Also @Mikefly123 would you say that this would be a good way of going about adding in the adafruit_rfm libraries? I noticed the old (now removed in this PR) pysquared_rfm9x.py is a modified version of the adafruit library but I don't think we need any modifications so I simply copied the library from the adafruit library.

@Mikefly123
Copy link
Member

Cruising through the changes that you've made it seems like a reasonable way of trying to get this working. Ideally we would want to implement some kind of system for switching the radio config values depending on if we want LoRa or FSK mode rather than just nuking all of the LoRa config stuff.

@Camerooooon do you have a SDR that you can hookup to monitor the frequency you're trying to transmit on and watch for activity on the waterfall to see if anything is coming out of the radio at all?

@Camerooooon
Copy link
Contributor Author

Cruising through the changes that you've made it seems like a reasonable way of trying to get this working. Ideally we would want to implement some kind of system for switching the radio config values depending on if we want LoRa or FSK mode rather than just nuking all of the LoRa config stuff.

@Camerooooon do you have a SDR that you can hookup to monitor the frequency you're trying to transmit on and watch for activity on the waterfall to see if anything is coming out of the radio at all?

I believe the adafruit_rfm rfm9xfsk module that I am implementing also has support for LoRa via the rfm9x module which is a drop in replacement for the rfm9xfsk one which is why I am commenting out the LoRa config for now. I will need to figure the best way to implement switching between radio modes in the future.

As for the SDR, I was using a simple quad band FM transceiver to monitor the frequency and it was not making any noise. From my experience with fsk it should sound like a squawking noise which I didn't hear. I will try an SDR tomorrow since I ran out of time today.

@Mikefly123
Copy link
Member

Hey @Camerooooon! Just checking if you managed to check it out using an SDR.

@Mikefly123 Mikefly123 self-requested a review October 11, 2024 21:07
@Camerooooon
Copy link
Contributor Author

Hey @Camerooooon! Just checking if you managed to check it out using an SDR.

I havent had time yet, will try on Monday.

@Camerooooon
Copy link
Contributor Author

Hello @Mikefly123 I think work is finally back on track as far as this pr.

Using an SDR to try and view the signal I noticed a very large momentary blip of signal spanning across the entire spectrogram when the signal ends the transmission. In addition there is a very faint signal around 4 mhz above the desired transmission frequency that lasts throughout the transmission. I'm not sure why there is such odd behavior. Luckily @DavidUniack just told me he will lend me some test boards so I can get more work done.

@Camerooooon
Copy link
Contributor Author

@Mikefly123
20241110_16h24m27s_grim_anotated

@Camerooooon
Copy link
Contributor Author

After looking more into I think that this might just be random noise as a result of the two devices being connected to the same computer and I think that the "Line of noise spanning all frequencies" might be the device attempting to transmit and failing.

@Mikefly123
Copy link
Member

Hm, pretty interesting @Camerooooon can you share two things to give us some more context?

  • What does your SDR look like when you transmit LoRa packets?
  • What is the length of the test message you're trying to send? (short strings like "Hello World" might be hard to see compared to a 250 Byte String)

@Camerooooon
Copy link
Contributor Author

Hm, pretty interesting @Camerooooon can you share two things to give us some more context?

* What does your SDR look like when you transmit LoRa packets?

* What is the length of the test message you're trying to send? (short strings like "Hello World" might be hard to see compared to a 250 Byte String)

The LORA looks nothing like what I was seeing in the image above, it was a strong signal which was being picked up across multiple frequencies. As for the length of the message I am sending the full status report message so I don't think the length is the issue. After more testing I noticed that the default baud rate was very high and after lowering it in the most recent commit my SDR now shows a good clean signal when transmitting FSK! I tried decoding the FSK with the SDR with no success but I imagine if I use another satellite as a client I could successfully decode the FSK signal.

@Camerooooon
Copy link
Contributor Author

Here is a screenshot of the FSK tranmission
20241112_13h20m12s_grim

@Mikefly123
Copy link
Member

Oh great @Camerooooon! Have you tried to decode the FSK using a second flight controller board? The adafruit_rfm library should natively support receiving and directly decoding with the hardware. I've personally found that using SDRs to decode digital modulations to be incredibly frustrating.

@Camerooooon
Copy link
Contributor Author

Oh great @Camerooooon! Have you tried to decode the FSK using a second flight controller board? The adafruit_rfm library should natively support receiving and directly decoding with the hardware. I've personally found that using SDRs to decode digital modulations to be incredibly frustrating.

Yeah that's what I'm going to try when I get a chance.

@Camerooooon Camerooooon changed the base branch from main to orpheus_edition November 13, 2024 23:00
@Camerooooon
Copy link
Contributor Author

Camerooooon commented Nov 13, 2024

This should be ready for testing. Allows for switching between LoRa and FSK mode based on the f_fsk value.

Alternating between FSK and LoRa every few days and waking from sleep on rx activity is not implemented on this PR.

@Mikefly123 this is ready for test & merge.

Copy link
Member

@Mikefly123 Mikefly123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Mikefly123 Mikefly123 merged commit 9def52c into proveskit:orpheus_edition Nov 18, 2024
1 check passed
@Mikefly123 Mikefly123 added the enhancement New feature or request label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merging the New Adafruit RFM Library into the PySquared Code
2 participants